package com.zxj.schoolxianyu.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zxj.schoolxianyu.dao.userDataDao;
import com.zxj.schoolxianyu.entity.userData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GetUserDataService {
    @Autowired(required = false)
    private userDataDao userDataDao;

    public userData userData(userData userData) {
        EntityWrapper<userData> wrapper = new EntityWrapper<>();
        wrapper.eq("username", userData.username);
        List<userData> userDataList = userDataDao.selectList(wrapper);
        return userDataList.get(0);
    }
}
